$(function (){
    $('#phone').on('blur',function (){
        $.ajax({
            type        :"GET",
            url         :"phoneExist?phone="+this.value,
            success     :function (data){
                console.log(data);
                if(data.phone === "Not Exist"){
                    $('#phoneTips').attr("class","okTips").text('Available');
                }else{
                    $('#phoneTips').attr("class","errorTips").text('Invalid');
                }
            }
        });
    });
});